package com.xuecheng.learning.feign;

import com.xuecheng.commons.model.dto.RecordDto;
import com.xuecheng.commons.model.vo.ResponseResult;
import com.xuecheng.learning.service.CourseRecordService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author HuangYuwu
 * @CreateTime 2022/9/17 00:20
 */
@RestController
@Slf4j
public class FeignCourseRecordController {
    @Autowired
    private CourseRecordService courseRecordService;
    /**
     * （支付成功）保存或更新选课记录
     * @param recordDto
     * @return
     */
    @PostMapping("/courseRecord/saveRecord")
    public ResponseResult saveRecord(@RequestBody RecordDto recordDto){
        return courseRecordService.saveRecord(recordDto);
    }
}
